19. Quiz: Particle Weights

Calculating the Particle's Final Weight

Now we that we have done the measurement transformations and associations, we have all the pieces we need to calculate the particle's final weight. The particles final weight will be calculated as the product of each measurement's Multivariate-Gaussian probability density.

The Multivariate-Gaussian probability density has two dimensions, x and y. The mean of the Multivariate-Gaussian is the measurement's associated landmark position and the Multivariate-Gaussian's standard deviation is described by our initial uncertainty in the x and y ranges. The Multivariate-Gaussian is evaluated at the point of the transformed measurement's position. The formula for the Multivariate-Gaussian can be seen below.

P(x,y) =\frac{1}{2\pi \sigma_{x}\sigma_{y}}e^{-(\frac{(x-\mu_x)^2}{2\sigma_x^2}+\frac{(y-\mu_y)^2}{2\sigma_y^2})}

To complete the next set of quizzes, calculate each measurement's Multivariate-Gaussian probability density using the formula above and the previously calculated values. In this example the standard deviation for both x and y is 0.3.

Note that x and y are the observations in map coordinates from the landmarks quiz and \mu_x , \mu_y are the coordinates of the nearest landmarks. These should correspond to the correct responses from previous quizzes.

OBS1 Multivariate-Gaussian Probability

QUESTION:

What is the calculated Multivariate-Gaussian probability density of OBS1? Write your answer in scientific notation with an accuracy of two decimal places, for example 3.14E-15.

SOLUTION:

NOTE: The solutions are expressed in RegEx pattern. Udacity uses these patterns to check the given answer

OBS2 Multivariate-Gaussian Probability

QUESTION:

What is the calculated Multivariate-Gaussian probability density of OBS2? Write your answer in scientific notation with an accuracy of two decimal places, for example 3.14E-15.

SOLUTION:

NOTE: The solutions are expressed in RegEx pattern. Udacity uses these patterns to check the given answer

OBS3 Multivariate-Gaussian Probability

QUESTION:

What is the calculated Multivariate-Gaussian probability density of OBS3? Write your answer in scientific notation with an accuracy of two decimal places, for example 3.14E-15.

SOLUTION:

NOTE: The solutions are expressed in RegEx pattern. Udacity uses these patterns to check the given answer

Resources, Tips, and Hints

  • The elements of the formula above can be entered into a calculator but consider writing a function. This will be a valuable addition to your toolkit.
  • Recall that x and y are the observations in map coordinates from the landmarks quiz and \mu_x , \mu_y are the coordinates of the nearest landmarks. These should correspond to the correct responses from previous quizzes.

Particle's Final Weight

To get the final weight just multiply all the calculated measurement probabilities together.

Particle's Final weight

QUESTION:

What is the particle's final weight? Write your answer in scientific notation with an accuracy of two decimal places, for example 3.14E-15.

SOLUTION:

NOTE: The solutions are expressed in RegEx pattern. Udacity uses these patterns to check the given answer